import Layout from '@/layout'
const driverRouter = {
  path: '/driver',
  name: 'driver-group',
  component: Layout,
  meta: { title: '驾驶员报表', icon: 'tree', roles: ['m6600'] },
  children: [
    {
      path: 'day',
      component: (resolve) => require(['@/views/driver-group/day'], resolve),
      name: 'DriverDayManage',
      remoteParam: { serviceName: 'bi', path: '/api/statistics/driver/day/' },
      remoteUrl: '/',
      meta: { title: '驾驶员日报', roles: ['m6610'] }
    },
    {
      path: 'month',
      component: (resolve) => require(['@/views/driver-group/month'], resolve),
      name: 'DriverMonthManage',
      remoteParam: { serviceName: 'bi', path: '/api/statistics/driver/month/' },
      remoteUrl: '',
      meta: { title: '驾驶员月报', roles: ['m6620'] }
    },
    {
      path: 'year',
      component: (resolve) => require(['@/views/driver-group/year'], resolve),
      name: 'DriverYearManage',
      remoteParam: { serviceName: 'bi', path: '/api/statistics/driver/year/' },
      remoteUrl: '',
      meta: { title: '驾驶员年报', roles: ['m6630'] }
    },
    {
      path: 'top',
      component: (resolve) => require(['@/views/driver-group/top'], resolve),
      name: 'DriverTopManage',
      remoteParam: { serviceName: 'bi', path: '/api/statistics/driver/top/' },
      remoteUrl: '',
      meta: { title: '驾驶员排行', roles: ['m6640'] }
    }
  ]
}
const carRouter = {
  path: '/car',
  name: 'car-group',
  component: Layout,
  meta: { title: '车辆报表', icon: 'tree', roles: ['m6700'] },
  children: [
    {
      path: 'day',
      component: (resolve) => require(['@/views/car-group/day'], resolve),
      name: 'CarDayManage',
      remoteParam: { serviceName: 'bi', path: '/api/statistics/car/day/' },
      remoteUrl: '',
      meta: { title: '车辆日报', roles: ['m6710'] }
    },
    {
      path: 'month',
      component: (resolve) => require(['@/views/car-group/month'], resolve),
      name: 'CarMonthManage',
      remoteParam: { serviceName: 'bi', path: '/api/statistics/car/month/' },
      remoteUrl: '',
      meta: { title: '车辆月报', roles: ['m6720'] }
    },
    {
      path: 'year',
      component: (resolve) => require(['@/views/car-group/year'], resolve),
      name: 'CarYearManage',
      remoteParam: { serviceName: 'bi', path: '/api/statistics/car/year/' },
      remoteUrl: '',
      meta: { title: '车辆年报', roles: ['m6730'] }
    },
    {
      path: 'top',
      component: (resolve) => require(['@/views/car-group/top'], resolve),
      name: 'CarTopManage',
      remoteParam: { serviceName: 'bi', path: '/api/statistics/car/top/' },
      remoteUrl: '',
      meta: { title: '车辆排行', roles: ['m6740'] }
    }
  ]
}
const logisticsRouter = {
  path: '/logistics',
  name: 'logistics-group',
  component: Layout,
  meta: { title: '运输报表', icon: 'tree', roles: ['m6500'] },
  children: [
    {
      path: 'day',
      component: (resolve) => require(['@/views/logistics-group/day'], resolve),
      name: 'LogisticsDayManage',
      remoteParam: { serviceName: 'bi', path: '/api/statistics/logistics/day/' },
      remoteUrl: '',
      meta: { title: '运输日报', roles: ['m6510'] }
    },
    {
      path: 'month',
      component: (resolve) => require(['@/views/logistics-group/month'], resolve),
      name: 'LogisticsMonthManage',
      remoteParam: { serviceName: 'bi', path: '/api/statistics/logistics/month/' },
      remoteUrl: '',
      meta: { title: '运输月报', roles: ['m6520'] }
    },
    {
      path: 'year',
      component: (resolve) => require(['@/views/logistics-group/year'], resolve),
      name: 'LogisticsYearManage',
      remoteParam: { serviceName: 'bi', path: '/api/statistics/logistics/year/' },
      remoteUrl: '',
      meta: { title: '运输年报', roles: ['m6530'] }
    }
  ]
}

export default { logisticsRouter, driverRouter, carRouter }
